using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Configuration;
using System.Web.UI;
using System.Web.UI.WebControls;
 
public partial class JobSeekers_location : System.Web.UI.Page
{
    string connectionString = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        
        connectionString =
         WebConfigurationManager.ConnectionStrings[
           "RecruitVietnam"].ConnectionString;
        if(!IsPostBack) 
            ShowData(1);
    }
    
    void ShowData(int area)
    {
        if(area == 1)
            this.Image1.ImageUrl = 
            "~/SpecialImages/VietnamSouth.gif";
        else
            this.Image1.ImageUrl = 
            "~/SpecialImages/VietnamNorth.gif";

        Common cls =
        new Common(connectionString); 
        DataTable dataTable =
        cls.GetDataTable("SPJobByProvince", 
        "@Area", area.ToString() );
        GridViewHelper helper = 
        new GridViewHelper();
        helper.FillDataTableToGridView(
        dataTable, this.GridView2);
        
         
    }
    protected void RadioButtonChange_CheckedChanged(object sender, EventArgs e)
    {
        if(RadioButton1.Checked)
            ShowData(0);
        else
            ShowData(1);
    }
}
